<?php
use yii\bootstrap\ActiveForm;
?>
<link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" href="/static/css/admin.css" type="text/css">
<link rel="stylesheet" href="/static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/daterangepicker/daterangepicker.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datepicker/datepicker3.css" type="text/css">

<style>
    .ul_tree_display{
        display: none;
    }
    .tr_tree_display{
        display: none;
    }
    .dataTables_length{
        margin-top: 10px;
    }
    .dataTable>tbody>tr>td{
        vertical-align: middle;
        font-size: 0.8em;
        padding: 8px 18px;
    }
    .dataTable>thead>tr>th{
        vertical-align: middle;
        font-size: 0.8em;
    }
</style>
<div class="tabs-panel">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!--<h3 class="box-title">Hover Data Table</h3>-->
                    <h4 class="modal-title">
                        <strong>品牌专题管理 &nbsp; &nbsp; &nbsp; &nbsp;品牌名称：<?php echo $brand_name  ?></label></strong>
                        <input type="hidden" name="search_brand_id" id="search_brand_id" value = "<?php echo $brand_id  ?>">
                    </h4><br>
                    <label>类型：</label>
                    <select id="search_typ" name="search_typ" class="depart-input" style="width: 150px">
                        <option value="">请选择</option>
                        <option value="1">PC</option>
                        <option value="2">WAP</option>
                    </select>&nbsp;

                    <button type="button" class="btn btn-primary depart-modal" id="select_button" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button> &nbsp;
                    <button type="button" class="btn btn-primary depart-modal" id="back_button" style="width: 100px;">返回</button> &nbsp;
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <button type="button" class="btn btn-success depart-modal" id="add_button" style="width: 100px;">添加</button>
                    <table id="table_list" class="display">
                        <thead>
                        <tr>
                            <th style="width: 5%">操作</th>
                            <th style="width: 5%">ID</th>
                            <th style="width: 5%">类型</th>
                            <th style="width: 22%">图片url</th>
                            <th style="width: 8%">图片链接</th>
                            <th style="width: 8%">图片alt属性</th>
                            <th style="width: 15%">说明</th>
                            <th style="width: 8%">排序序号</th>
                            <th style="width: 5%"><?=TITLE_STATUS?></th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id = "myModalLabel" name = "myModalLabel">
                        xxxx
                    </h4>
                </div>
                <div class="modal-body">
                    <form action="/goods-brand/save-detail" method="post" id="group_form">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="typ">类型</label>
                                <select id="typ" name="typ" class="depart-input" style="width: 150px">
                                    <option value="1" selected="selected">PC</option>
                                    <option value="2">WAP</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>图片</label>
                                <button type="button" class="btn btn-success depart-modal upload-img-btn-brand" style="width: 100px;">图片上传</button>
                                <button style="display: none;" data-img="" type="button" class="btn btn-success depart-modal show-img-btn-brand" style="width: 100px;">查看图片</button>
                                <input type="hidden" name="img_url_brand" class="form-control" id="img_url_brand">
                            </div>
                            <div class="form-group">
                                <label for="img_link">图片link</label>
                                <input type="text" class="form-control" name="img_link" id="img_link" placeholder="图片link">
                            </div>
                            <div class="form-group">
                                <label for="img_alt">图片alt</label>
                                <input type="text" class="form-control" name="img_alt" id="img_alt" placeholder="图片alt">
                            </div>
                            <div class="form-group">
                                <label for="brand_desc">图片说明</label>
                                <input type="text" class="form-control" name="brand_desc" id="brand_desc" placeholder="图片说明">
                            </div>
                            <div class="form-group">
                                <label for="sort">排序</label>
                                <input type="text" class="form-control" name="sort" id="sort" placeholder="排序" value="0">
                            </div>
                            <div class="form-group">
                                <label for="use_flg">状态</label>
                                <select name="use_flg" id="use_flg" class="form-control" style="width: 30%;">
                                    <option value="1">启用</option>
                                    <option value="0">禁用</option>
                                </select>
                            </div>
                        </div>
                        <input type="hidden" name="id" id="id" >
                        <input type="hidden" name="brand_id" id="brand_id" value = "<?php echo $brand_id  ?>">
                        <input type="hidden" name="brand_name" id="brand_name" value = "<?php echo $brand_name  ?>">
                        <input type="hidden" name="current_mode" id="current_mode">
                        <!-- /.box-body -->
                    </form>
                    <div style="display: none">
                        <?php $form = ActiveForm::begin(['id'=>'upload_form_update','action'=>'/common/img-upload'],['options' => ['enctype' => 'multipart/form-data']]) ?>
                        <?= $form->field($model, 'img_url')->fileInput(['class' => 'upload_file_ot']) ?>
                        <?php ActiveForm::end() ?>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <a type="button" class="btn btn-primary ajax_submit">提交</a>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <input type="hidden" name="imageBathUrl" id="imageBathUrl" value="<?php echo Yii::$app->params['imageBathUrl'] . '/' ?>">
</div>
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<!--图片上传插件用-->
<script type="text/javascript" src="/static/plugins/jquery.form.js"></script>
<!--图片显示用-->
<script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript" src="/static/app/goods_brand/detail.js?version=<?=Yii::$app->params['version']?>"></script>